from . import views
from django.conf.urls import url

urlpatterns = [
    # 跳转到找回密码页面
    url(r'^findpwd/$', views.FindPwdView.as_view(), name='findpwd'),
    # 校验用户名（手机号）和验证码
    url(r'^accounts/(?P<account>[\w-]{5,20})/sms/token/', views.CheckPwdView.as_view(), name='checkpwd'),
    # 获取短信验证码
    url(r'^sms_codes/$', views.SMSCodeView.as_view(), name='smscodes'),
    # /accounts/' + this.username + '/password/token/?sms_code=' + this.sms_code
    # 验证用户名（手机号）和手机短信验证码
    url(r'^accounts/(?P<account>[\w-]{5,20})/password/token/$', views.CheckSMSView.as_view(), name='checksms'),
    # 设置新密码users/'+ this.user_id +'/password/
    url(r'^users/(?P<user_id>[\d]+)/password2/$', views.SavePwdView.as_view(), name='savepwd')
]